﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;

namespace BLL
{
    /// <summary>
    /// 公共接口
    /// </summary>
    public interface IBLL
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="imodel">IModel对象</param>
        /// <returns>返回记录行数</returns>
        int Add(IModel imodel);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="imodel">IModel对象</param>
        /// <returns>返回记录行数</returns>
        int Update(IModel imodel);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="imodel">IModel对象</param>
        /// <returns>返回记录行数</returns>
        int Delete(IModel imodel);

        /// <summary>
        /// 
        /// </summary>
        /// <typeparam name="T">任意类型参数</typeparam>
        /// <param name="key">该类型键值</param>
        /// <returns>IModel对象</returns>
        IModel GetModel<T>(T key);      
    }
}
